package org.elanfox.intellicommunity.biz.entity.resident;

import lombok.Data;
import org.elanfox.intellicommunity.biz.entity.Base2PO;
import org.elanfox.intellicommunity.biz.entity.equipment.LocatorPO;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;

import javax.persistence.*;

/**
 * 楼层定位器关联表
 *
 * @author loutianxi
 * @date 2019-12-03
 */
@Entity
@Data
@Table(name = "t_locator_structure")
public class LocatorStructureRelPO extends Base2PO {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "rel_id")
    private Integer relId;

    @Column(name = "structure_id")
    private Integer structureId;

    @OneToOne
    @JoinColumn(name = "locator_id")
    @NotFound(action = NotFoundAction.IGNORE)
    private LocatorPO locatorPO;
}
